package cn.edu.fzu.homemaking.wallet.api;

import cn.edu.fzu.homemaking.wallet.domain.enums.CompanyUserTypeEnum;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.edu.fzu.homemaking.web.Result;

@FeignClient("sso")
public interface SsoApi {

    @GetMapping("/api/sso/isLogin")
    Result isLogin();


    @GetMapping("api/sso/index")
    Result loginIndex(@RequestParam("sessionId") String sessionId);


    @GetMapping("/api/sso/setSessionAttribute")
    Result setSession(@RequestParam("key") String key, @RequestParam("value") Object value);


    @GetMapping("/api/sso/getSessionAttribute")
    Result getSession(@RequestParam("param") String param);


    @GetMapping("/api/sso/auth/user/getNameById")
    Result getNameById(@RequestParam("id") Long id, @RequestParam("userType") String userType);


    @GetMapping("/api/sso/auth/user/listAllCompanyUser")
    Result listAllCompanyUser(@RequestParam("type") CompanyUserTypeEnum type, @RequestParam("pageNum") Integer pageNum,
                              @RequestParam("pageSize") Integer pageSize);

}
